Skip to content

Remove unused DataProtection configuration from Sidecar#3776

Merged
bgavrilMS merged 3 commits intomasterfrom
copilot/fix-dataprotect-in-sidecar
Apr 20, 2026
Merged

Remove unused DataProtection configuration from Sidecar#3776
bgavrilMS merged 3 commits intomasterfrom
copilot/fix-dataprotect-in-sidecar

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 15, 2026

The Sidecar uses in-memory token caching (AddInMemoryTokenCaches), so the ConfigureDataProtection method was never actually protecting tokens at rest. Beyond being dead code, it introduced compliance concerns: keys were persisted to disk in plaintext by default, and the optional certificate-based encryption had no rotation mechanism.

Changes

  • Program.cs: Remove ConfigureDataProtection method and its call site; drop unused using directives for System.Security.Cryptography.X509Certificates and Microsoft.AspNetCore.DataProtection. The Sidecar now relies on ASP.NET Core's default ephemeral in-memory data protection.
  • README.md: Remove the Data protection configuration entry documenting the now-deleted DATA_PROTECTION_KEYS_PATH, DATA_PROTECTION_CERT_PATH, and DATA_PROTECTION_CERT_PASSWORD environment variables.

Copilot AI linked an issue Apr 15, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix DataProtection in SideCar to use encryption Remove unused DataProtection configuration from Sidecar Apr 15, 2026
Copilot AI requested a review from bgavrilMS April 15, 2026 11:15
@bgavrilMS bgavrilMS marked this pull request as ready for review April 15, 2026 21:01
@bgavrilMS bgavrilMS requested a review from a team as a code owner April 15, 2026 21:01
Agent-Logs-Url: https://github.com/AzureAD/microsoft-identity-web/sessions/bf35223d-645a-489b-9d64-3769b4a891af

Co-authored-by: bgavrilMS <12273384+bgavrilMS@users.noreply.github.com>
@bgavrilMS bgavrilMS force-pushed the copilot/fix-dataprotect-in-sidecar branch from 9385ec1 to 2dc9f60 Compare April 15, 2026 21:01
This was referenced Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DataProtection in SideCar is not used

3 participants